<!DOCTYPE HTML>
<html lang="en" >
    <!-- Start book Python数据分析课程讲义 -->
    <head>
        <!-- head:start -->
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <title>一、工作环境准备及数据分析建模理论基础 | Python数据分析课程讲义</title>
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 2.6.7">
        <meta name="author" content="BigCat">
        
        <meta name="HandheldFriendly" content="true"/>
        <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
        <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
        <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">
        
    <link rel="stylesheet" href="../../gitbook/style.css">
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-tbfed-pagefooter/footer.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-splitter/splitter.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-highlight/website.css">
        
    
        
        <link rel="stylesheet" href="../../gitbook/plugins/gitbook-plugin-fontsettings/website.css">
        
    
    

        
    
    
    <link rel="next" href="../../file/part01/1.1.html" />
    
    
    <link rel="prev" href="../../index.html" />
    

        <!-- head:end -->
    </head>
    <body>
        <!-- body:start -->
        
    <div class="book"
        data-level="1"
        data-chapter-title="一、工作环境准备及数据分析建模理论基础"
        data-filepath="file/part01/1.md"
        data-basepath="../.."
        data-revision="Thu Apr 27 2017 00:50:19 GMT+0800 (CST)"
        data-innerlanguage="">
    

<div class="book-summary">
    <nav role="navigation">
        <ul class="summary">
            
            
            
            

            

            
    
        <li class="chapter " data-level="0" data-path="index.html">
            
                
                    <a href="../../index.html">
                
                        <i class="fa fa-check"></i>
                        
                        传智播客Python学院数据分析
                    </a>
            
            
        </li>
    
        <li class="chapter active" data-level="1" data-path="file/part01/1.html">
            
                
                    <a href="../../file/part01/1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.</b>
                        
                        一、工作环境准备及数据分析建模理论基础
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.1" data-path="file/part01/1.1.html">
            
                
                    <a href="../../file/part01/1.1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.1.</b>
                        
                        Python 3.x新特性和编码回顾
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="file/part01/1.2.html">
            
                
                    <a href="../../file/part01/1.2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.2.</b>
                        
                        DIKW模型与数据工程
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="file/part01/1.3.html">
            
                
                    <a href="../../file/part01/1.3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>1.3.</b>
                        
                        数据分析建模理论基础
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="2" data-path="file/part02/2.html">
            
                
                    <a href="../../file/part02/2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.</b>
                        
                        二、科学计算工具NumPy
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="2.1" data-path="file/part02/2.1.html">
            
                
                    <a href="../../file/part02/2.1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.1.</b>
                        
                        ndarray的创建与数据类型
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.2" data-path="file/part02/2.2.html">
            
                
                    <a href="../../file/part02/2.2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.2.</b>
                        
                        ndarray的矩阵处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.3" data-path="file/part02/2.3.html">
            
                
                    <a href="../../file/part02/2.3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.3.</b>
                        
                        ndarray的元素处理
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="2.4" data-path="file/part02/2.4.html">
            
                
                    <a href="../../file/part02/2.4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>2.4.</b>
                        
                        实战案例：2016美国总统大选民意调查统计
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="3" data-path="file/part03/3.html">
            
                
                    <a href="../../file/part03/3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.</b>
                        
                        三、数据分析工具Pandas
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="3.1" data-path="file/part03/3.1.html">
            
                
                    <a href="../../file/part03/3.1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.1.</b>
                        
                        Pandas的数据结构
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.2" data-path="file/part03/3.2.html">
            
                
                    <a href="../../file/part03/3.2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.2.</b>
                        
                        Pandas的索引操作
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.3" data-path="file/part03/3.3.html">
            
                
                    <a href="../../file/part03/3.3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.3.</b>
                        
                        Pandas的对齐运算
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.4" data-path="file/part03/3.4.html">
            
                
                    <a href="../../file/part03/3.4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.4.</b>
                        
                        Pandas的函数应用
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.5" data-path="file/part03/3.5.html">
            
                
                    <a href="../../file/part03/3.5.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.5.</b>
                        
                        Pandas的层级索引
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.6" data-path="file/part03/3.6.html">
            
                
                    <a href="../../file/part03/3.6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.6.</b>
                        
                        Pandas统计计算和描述
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.7" data-path="file/part03/3.7.html">
            
                
                    <a href="../../file/part03/3.7.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.7.</b>
                        
                        Pandas分组与聚合
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.8" data-path="file/part03/3.8.html">
            
                
                    <a href="../../file/part03/3.8.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.8.</b>
                        
                        数据清洗、合并、转化和重构
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.9" data-path="file/part03/3.9.html">
            
                
                    <a href="../../file/part03/3.9.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.9.</b>
                        
                        聚类模型 -- K-Means介绍
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="3.10" data-path="file/part03/3.10.html">
            
                
                    <a href="../../file/part03/3.10.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>3.10.</b>
                        
                        实战案例：全球食品数据分析
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="4" data-path="file/part04/4.html">
            
                
                    <a href="../../file/part04/4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.</b>
                        
                        四、数据可视化工具
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="4.1" data-path="file/part04/4.1.html">
            
                
                    <a href="../../file/part04/4.1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.1.</b>
                        
                        Matplotlib绘图
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.2" data-path="file/part04/4.2.html">
            
                
                    <a href="../../file/part04/4.2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.2.</b>
                        
                        Seaborn绘图
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.3" data-path="file/part04/4.3.html">
            
                
                    <a href="../../file/part04/4.3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.3.</b>
                        
                        Bokeh绘图
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="4.4" data-path="file/part04/4.4.html">
            
                
                    <a href="../../file/part04/4.4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>4.4.</b>
                        
                        实战案例：世界高峰数据可视化
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="5" data-path="file/part06/6.html">
            
                
                    <a href="../../file/part06/6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.</b>
                        
                        五、自然语言处理NLTK
                    </a>
            
            
            <ul class="articles">
                
    
        <li class="chapter " data-level="5.1" data-path="file/part06/6.1.html">
            
                
                    <a href="../../file/part06/6.1.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.1.</b>
                        
                        NLTK与自然语言处理基础
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.2" data-path="file/part06/6.2.html">
            
                
                    <a href="../../file/part06/6.2.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.2.</b>
                        
                        jieba分词
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.3" data-path="file/part06/6.3.html">
            
                
                    <a href="../../file/part06/6.3.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.3.</b>
                        
                        情感分析
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.4" data-path="file/part06/6.4.html">
            
                
                    <a href="../../file/part06/6.4.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.4.</b>
                        
                        文本相似度和分类
                    </a>
            
            
        </li>
    
        <li class="chapter " data-level="5.5" data-path="file/part06/6.6.html">
            
                
                    <a href="../../file/part06/6.6.html">
                
                        <i class="fa fa-check"></i>
                        
                            <b>5.5.</b>
                        
                        实战案例：微博情感分析
                    </a>
            
            
        </li>
    

            </ul>
            
        </li>
    


            
            <li class="divider"></li>
            <li>
                <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
                    Published with GitBook
                </a>
            </li>
            
        </ul>
    </nav>
</div>

    <div class="book-body">
        <div class="body-inner">
            <div class="book-header" role="navigation">
    <!-- Actions Left -->
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../../" >Python数据分析课程讲义</a>
    </h1>
</div>

            <div class="page-wrapper" tabindex="-1" role="main">
                <div class="page-inner">
                
                
                    <section class="normal" id="section-">
                    
                        <h2 id="python&#x7248;&#x672C;">Python&#x7248;&#x672C;</h2>
<h4 id="python-2-or-python-3">Python 2 or Python 3</h4>
<ul>
<li>Python 2.x &#x662F;&#x65E9;&#x671F;&#x7248;&#x672C;&#xFF0C;Python 3.x&#x662F;&#x5F53;&#x524D;&#x7248;&#x672C;</li>
<li>Python 2.7 (2.x&#x7684;&#x6700;&#x7EC8;&#x7248;)&#x4E8E;2010&#x5E74;&#x53D1;&#x5E03;&#x540E;&#x5F88;&#x5C11;&#x6709;&#x5927;&#x7684;&#x66F4;&#x65B0;</li>
<li>Python 2.x &#x6BD4; Python3.x &#x62E5;&#x6709;&#x66F4;&#x591A;&#x7684;&#x5DE5;&#x5177;&#x5E93;</li>
<li>&#x5927;&#x591A;&#x6570;Linux&#x7CFB;&#x7EDF;&#x9ED8;&#x8BA4;&#x5B89;&#x88C5;&#x7684;&#x4ECD;&#x662F; Python 2.x</li>
<li>&#x7248;&#x672C;&#x9009;&#x62E9;&#x53D6;&#x51B3;&#x4E8E;&#x8981;&#x89E3;&#x51B3;&#x7684;&#x95EE;&#x9898;</li>
</ul>
<h5 id="&#x5EFA;&#x8BAE;&#x9009;&#x62E9;-python-2x-&#x7684;&#x60C5;&#x51B5;&#xFF1A;">&#x5EFA;&#x8BAE;&#x9009;&#x62E9; Python 2.x &#x7684;&#x60C5;&#x51B5;&#xFF1A;</h5>
<ul>
<li>&#x90E8;&#x7F72;&#x73AF;&#x5883;&#x4E0D;&#x53EF;&#x63A7;&#xFF0C;Python&#x7248;&#x672C;&#x4E0D;&#x80FD;&#x81EA;&#x884C;&#x9009;&#x62E9;</li>
<li>&#x67D0;&#x4E9B;&#x5DE5;&#x5177;&#x5E93;&#x8FD8;&#x6CA1;&#x6709;&#x63D0;&#x4F9B;&#x652F;&#x6301; Python 3.x&#x3002;</li>
<li>&#x5982;&#x679C;&#x9009;&#x62E9;&#x4F7F;&#x7528; Python 3.x&#xFF0C;&#x9700;&#x8981;&#x786E;&#x5B9A;&#x8981;&#x7528;&#x7684;&#x5DE5;&#x5177;&#x5E93;&#x652F;&#x6301;&#x65B0;&#x7248;&#x672C;&#x3002;</li>
</ul>
<blockquote>
<h4 id="&#x6CE8;&#x610F;&#xFF1A;&#x672C;&#x8BFE;&#x7A0B;&#x5C06;&#x4F1A;&#x4F7F;&#x7528;python-3x-&#x7248;&#x672C;">&#x6CE8;&#x610F;&#xFF1A;&#x672C;&#x8BFE;&#x7A0B;&#x5C06;&#x4F1A;&#x4F7F;&#x7528;Python 3.x &#x7248;&#x672C;</h4>
</blockquote>
<h2 id="python&#x73AF;&#x5883;&#x53CA;ide">Python&#x73AF;&#x5883;&#x53CA;IDE</h2>
<h4 id="python&#x73AF;&#x5883;">Python&#x73AF;&#x5883;</h4>
<p><code>Anaconda&#xFF08;&#x6C34;&#x87D2;&#xFF09;</code>&#xFF1A;&#x662F;&#x4E00;&#x4E2A;&#x79D1;&#x5B66;&#x8BA1;&#x7B97;&#x8F6F;&#x4EF6;&#x53D1;&#x884C;&#x7248;&#xFF0C;&#x96C6;&#x6210;&#x4E86;&#x5927;&#x91CF;&#x5E38;&#x7528;&#x6269;&#x5C55;&#x5305;&#x7684;&#x73AF;&#x5883;&#xFF0C;&#x5305;&#x542B;&#x4E86; conda&#x3001;Python &#x7B49; 180 &#x591A;&#x4E2A;&#x79D1;&#x5B66;&#x8BA1;&#x7B97;&#x5305;&#x53CA;&#x5176;&#x4F9D;&#x8D56;&#x9879;&#xFF0C;&#x5E76;&#x4E14;&#x652F;&#x6301;&#x6240;&#x6709;&#x64CD;&#x4F5C;&#x7CFB;&#x7EDF;&#x5E73;&#x53F0;&#x3002;&#x4E0B;&#x8F7D;&#x5730;&#x5740;&#xFF1A;<a href="https://www.continuum.io/downloads" target="_blank">https://www.continuum.io/downloads</a></p>
<p>&#x5B89;&#x88C5;&#x5305;&#xFF1A;<code>pip install xxx</code>,<code>conda install xxx</code></p>
<p>&#x5378;&#x8F7D;&#x5305;&#xFF1A;<code>pip uninstall xxx</code>,<code>conda uninstall xxx</code></p>
<p>&#x5347;&#x7EA7;&#x5305;&#xFF1A;<code>pip install upgrade xxx</code>,<code>conda update xxx</code></p>
<h4 id="ide">IDE</h4>
<h5 id="jupyter-notebook&#xFF1A;">Jupyter Notebook&#xFF1A;</h5>
<blockquote>
<p>&#x547D;&#x4EE4;&#xFF1A;jupyter notebook</p>
</blockquote>
<ol>
<li>Anaconda&#x81EA;&#x5E26;&#xFF0C;&#x65E0;&#x9700;&#x5355;&#x72EC;&#x5B89;&#x88C5;</li>
<li>&#x5B9E;&#x65F6;&#x67E5;&#x770B;&#x8FD0;&#x884C;&#x8FC7;&#x7A0B;</li>
<li><code>&#x57FA;&#x672C;&#x7684;web&#x7F16;&#x8F91;&#x5668;&#xFF08;&#x672C;&#x5730;&#xFF09;</code></li>
<li>.ipynb &#x6587;&#x4EF6;&#x5206;&#x4EAB;</li>
<li>&#x53EF;&#x4EA4;&#x4E92;&#x5F0F; </li>
<li>&#x8BB0;&#x5F55;&#x5386;&#x53F2;&#x8FD0;&#x884C;&#x7ED3;&#x679C; </li>
</ol>
<h5 id="ipython&#xFF1A;">IPython&#xFF1A;</h5>
<blockquote>
<p>&#x547D;&#x4EE4;&#xFF1A;ipython</p>
</blockquote>
<ol>
<li>Anaconda&#x81EA;&#x5E26;&#xFF0C;&#x65E0;&#x9700;&#x5355;&#x72EC;&#x5B89;&#x88C5; </li>
<li><code>Python&#x7684;&#x4EA4;&#x4E92;&#x5F0F;&#x547D;&#x4EE4;&#x884C; Shell</code></li>
<li>&#x53EF;&#x4EA4;&#x4E92;&#x5F0F; </li>
<li>&#x8BB0;&#x5F55;&#x5386;&#x53F2;&#x8FD0;&#x884C;&#x7ED3;&#x679C; </li>
<li>&#x53CA;&#x65F6;&#x9A8C;&#x8BC1;&#x60F3;&#x6CD5;</li>
</ol>
<h5 id="spyder&#xFF1A;">Spyder&#xFF1A;</h5>
<blockquote>
<p>&#x547D;&#x4EE4;&#xFF1A;spyder</p>
</blockquote>
<ol>
<li>Anaconda&#x81EA;&#x5E26;&#xFF0C;&#x65E0;&#x9700;&#x5355;&#x72EC;&#x5B89;&#x88C5; </li>
<li>&#x5B8C;&#x5168;&#x514D;&#x8D39;&#xFF0C;&#x9002;&#x5408;&#x719F;&#x6089;Matlab&#x7684;&#x7528;&#x6237;</li>
<li><code>&#x529F;&#x80FD;&#x5F3A;&#x5927;&#xFF0C;&#x4F7F;&#x7528;&#x7B80;&#x5355;&#x7684;&#x56FE;&#x5F62;&#x754C;&#x9762;&#x5F00;&#x53D1;&#x73AF;&#x5883;</code></li>
</ol>
<h5 id="pycharm&#xFF1A;">PyCharm&#xFF1A;</h5>
<ol>
<li>&#x9700;&#x8981;&#x81EA;&#x884C;&#x5B89;&#x88C5;&#xFF1A;<a href="https://www.jetbrains.com/pycharm/download/" target="_blank">https://www.jetbrains.com/pycharm/download</a></li>
<li>PyCharm&#xFF0C;JetBrains&#x7684;&#x7CBE;&#x54C1;&#xFF0C;&#x5168;&#x5E73;&#x53F0;&#x652F;&#x6301;&#xFF0C;&#x4E0D;&#x591A;&#x89E3;&#x91CA;&#x4E86;&#x3002;</li>
</ol>
<footer class="page-footer"><span class="copyright">Copyright &#xA9; BigCat all right reserved&#xFF0C;powered by Gitbook</span><span class="footer-modification">&#x300C;Revision Time:
2017-03-12 21:50:05&#x300D;
</span></footer>
                    
                    </section>
                
                
                </div>
            </div>
        </div>

        
        <a href="../../index.html" class="navigation navigation-prev " aria-label="Previous page: 传智播客Python学院数据分析"><i class="fa fa-angle-left"></i></a>
        
        
        <a href="../../file/part01/1.1.html" class="navigation navigation-next " aria-label="Next page: Python 3.x新特性和编码回顾"><i class="fa fa-angle-right"></i></a>
        
    </div>
</div>

        
<script src="../../gitbook/app.js"></script>

    
    <script src="../../gitbook/plugins/gitbook-plugin-splitter/splitter.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-toggle-chapters/toggle.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-fontsettings/buttons.js"></script>
    

    
    <script src="../../gitbook/plugins/gitbook-plugin-livereload/plugin.js"></script>
    

<script>
require(["gitbook"], function(gitbook) {
    var config = {"disqus":{"shortName":"gitbookuse"},"github":{"url":"https://github.com/dododream"},"search-pro":{"cutWordLib":"nodejieba","defineWord":["gitbook-use"]},"sharing":{"weibo":true,"facebook":true,"twitter":true,"google":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"tbfed-pagefooter":{"copyright":"Copyright © BigCat","modify_label":"「Revision Time:","modify_format":"YYYY-MM-DD HH:mm:ss」"},"baidu":{"token":"ff100361cdce95dd4c8fb96b4009f7bc"},"sitemap":{"hostname":"http://www.treenewbee.top"},"donate":{"wechat":"http://weixin.png","alipay":"http://alipay.png","title":"","button":"赏","alipayText":"支付宝打赏","wechatText":"微信打赏"},"edit-link":{"base":"https://github.com/dododream/edit","label":"Edit This Page"},"splitter":{},"toggle-chapters":{},"highlight":{},"fontsettings":{"theme":"white","family":"sans","size":2},"livereload":{}};
    gitbook.start(config);
});
</script>

        <!-- body:end -->
    </body>
    <!-- End of book Python数据分析课程讲义 -->
</html>
